package org.ms.mconf.sdk.service.ops;

import org.ms.mconf.sdk.exception.MicroConfigException;
import org.ms.mconf.sdk.model.NodeMultiConfig;
import org.ms.mconf.sdk.model.NodeConfig;

import java.util.Set;

/**
 * The Application-Config-Version(ACV) Service
 *
 * @author lry
 */
public interface IAvcService {

    /**
     * The publish Application-Config-Version(ACV)
     *
     * @param multiNodeConfig AVC multi node config {@link NodeMultiConfig}
     * @return @return successful return to true
     * @throws MicroConfigException micro config exception
     */
    boolean publish(NodeMultiConfig multiNodeConfig) throws MicroConfigException;

    /**
     * The delete Application-Config-Version(ACV)
     *
     * @param multiNodeConfig ACV node id config {@link NodeMultiConfig}
     * @return @return successful return to true
     * @throws MicroConfigException micro config exception
     */
    boolean delete(NodeMultiConfig multiNodeConfig) throws MicroConfigException;

    /**
     * The query Application-Config-Version(ACV) list
     *
     * @return Application-Config-Version(ACV) list
     * @throws MicroConfigException micro config exception
     */
    Set<NodeMultiConfig> query() throws MicroConfigException;

    /**
     * The select Application-Config-Version(ACV) list
     *
     * @return Application-Config-Version(ACV) list
     * @throws MicroConfigException micro config exception
     */
    Set<NodeConfig> select() throws MicroConfigException;

}
